home *** CD-ROM | disk | FTP | other *** search
- /****************************************************/
- /* */
- /* File: eventloop.c */
- /* */
- /* Program: ChromaKeyMovie */
- /* */
- /* By: Jason Hodges-Harris */
- /* */
- /* Copyright: © 1995 by Apple Computer, Inc., */
- /* all rights reserved. */
- /* */
- /****************************************************/
-
- // Mac toolbox headers
-
- #ifndef __EVENTS__
- #include <Events.h>
- #endif
-
-
- // Program headers
-
- #ifndef __CHROMAPPHEADER__
- #include "ChromaKeyMovie.app.h"
- #endif
-
- #ifndef __CHROMAPROTOSHEADER__
- #include "ChromaKeyMovie.protos.h"
- #endif
-
-
- // Global Variables
-
- extern Boolean gDone; // program loop test condition
- extern Boolean gMovieOpen;
-
-
- // EventLoop handles the application's main WNE loop
- // and is called from within the main() function.
-
- #pragma segment Main
- void EventLoop (void)
- {
- EventRecord event;
-
- while (!gDone)
- {
- if (WaitNextEvent (everyEvent,&event,kSleep,nil) || gMovieOpen)
- {
- DoEvent (&event);
- }
- }
- }
-